﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using System.Data;

namespace QuanLyThuNgan
{
    public partial class rpt_InBLTong_kobh : DevExpress.XtraReports.UI.XtraReport
    {
        public rpt_InBLTong_kobh()
        {
            InitializeComponent();
        }
        public DataSet ds = new DataSet();
        public DataSet Dds
        {
            get { return ds; }
            set { ds = value; }
        }
        private void rpt_InBLTong_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            int k = ds.Tables["InBienLaiCLS"].Rows.Count;
            int kk = ds.Tables["InBienLai"].Rows.Count;
            if (k == 0)
            {
                DetailCLS.Visible = false;
            }
            if (kk == 0)
                Detail2.Visible = false;
        }

        private void xrSubreport1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            XRSubreport detailReport = sender as XRSubreport;
            detailReport.ReportSource.DataSource = ds;
            
        }

        private void xrSubreport2_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            XRSubreport detailReport = sender as XRSubreport;
            detailReport.ReportSource.DataSource = ds;
            rpt_BienLaiThuTien rpbl = new rpt_BienLaiThuTien();
            rpbl.Dds = ds;
        }
       
    }
}
